import { PartialType } from '@nestjs/mapped-types';
import { Permission } from '../entities/permission.entity';
import { IsNotEmpty, IsOptional, IsString, IsUUID } from 'class-validator';

export class SavePermissionDto extends PartialType(Permission) {
  @IsString()
  @IsNotEmpty()
  value: string;

  @IsString()
  @IsOptional()
  name?: string;

  @IsUUID()
  @IsOptional()
  id?: string;
}
